package net.sudot.chess.business.model;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 社会化用户
 *
 * @author tangjialin on 2018-03-15.
 */
@Getter
@Setter
@Accessors(chain = true)
@Entity
public class SocialUser extends BaseEntity<SocialUser> {

    /** 登录插件ID */
    private String loginPluginId;
    /** 唯一ID */
    private String uniqueId;
    /** 用户 */
    private Long userId;
    /** 是否已关注 */
    private Boolean subscribe;

    @Transient
    public boolean isSubscribe() {
        return subscribe != null && subscribe;
    }

}